/*
 * Copyright 2007 Robert Hanson <iamroberthanson AT gmail.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hod.client.room;

import com.hod.client.backend.orm.client.GearsDataObject;


/**
 * @gears.table (name=Room, namespace=hoddatabase)
 * @gears.index (name= idRoomType, fields= idRoomType)
 * @gears.namedQuery (name=FindAll, sql="select :Room")
 * @gears.namedQuery (name=FindByNumber, sql="select :Room order by floor,number")
 * @gears.namedQuery (name=FindByType, sql="select :Room where idRoomType=? AND state=?")
 * @gears.namedQuery (name=FindByState, sql="select :Room order by state")
 * @gears.namedQuery (name=FindById, sql="select :Room order by idRoom desc")
 * @gears.namedQuery (name=FindAvailable, sql="select :Room where state=?")
 * @gears.namedQuery (name=FindByFloor, sql="select :Room order by floor,number") 
 */
public class Room implements GearsDataObject
{
	public static final String FIND_ALL = "FindAll";
    public static final String FIND_BY_NUMBER = "FindByNumber";
    public static final String FIND_BY_TYPE = "FindByType";
    public static final String FIND_BY_STATE = "FindByState";
    public static final String FIND_BY_ID = "FindById";
	public static final String FIND_AVAILABLE = "FindAvailable";
	public static final String FIND_BY_FLOOR = "FindByFloor";
    /**
     * @gears.id (length=10)
     */
    private Integer idRoom;
    /**
     * @gears.column
     */        
    private String number;
    /**
     * @gears.column
     */    
    private String state;
    /**
     * @gears.column
     */    
    private Integer floor;
    /**
     * @gears.column (references=RoomType(idRoomType))
     */    
    private Integer idRoomType;
    /**
     * @gears.column
     */    
    private Boolean active = true;
    /**
     * @gears.column
     */ 
    private Boolean sharedBath;
    
    
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public Integer getFloor() {
		return floor;
	}
	public void setFloor(Integer floor) {
		this.floor = floor;
	}
	public Integer getIdRoomType() {
		return idRoomType;
	}
	public void setIdRoomType(Integer idRoomType) {
		this.idRoomType = idRoomType;
	}
	public Boolean getActive() {
		return active;
	}
	public void setActive(Boolean active) {
		this.active = active;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public String getNumber() {
		return number;
	}
	public void setIdRoom(Integer idRoom) {
		this.idRoom = idRoom;
	}
	public Integer getIdRoom() {
		return idRoom;
	}
	public void setSharedBath(Boolean sharedBath) {
		this.sharedBath = sharedBath;
	}
	public Boolean getSharedBath() {
		return sharedBath;
	}
    
    
    
}
